package com.matrix.gallery.ui.wallpaper.fragment

import android.view.LayoutInflater
import com.matrix.basecore.base.BaseFragment
import com.matrix.basecore.utils.glide.GlideUtil
import com.matrix.gallery.R
import com.matrix.gallery.databinding.FragmentViewpagerBinding
import com.matrix.gallery.ui.wallpaper.bean.PhoneComputerTypeBean

class PageFragment(category: PhoneComputerTypeBean.Category) :
    BaseFragment<FragmentViewpagerBinding>() {

    private var mCategory: PhoneComputerTypeBean.Category = category
    override fun getViewBinding(): FragmentViewpagerBinding {
        return FragmentViewpagerBinding.inflate(layoutInflater)
    }

    override fun initView(inflater: LayoutInflater) {
        mViewBinding.tvType.text = mCategory.name
        GlideUtil.loadRoundImage(
            mCategory.cover,
            context,
            mViewBinding.ivCover,
            8,
            R.mipmap.icon_default_bg
        )
    }
}